package co.edu.unal.satacredito.administration.view.user;

import java.util.List;

import javax.annotation.PostConstruct;
import javax.ejb.EJB;
import javax.faces.bean.ManagedBean;

import co.edu.unal.satacredito.administration.view.general.AdministrationBean;
import co.edu.unal.satacredito.infrastructure.dto.UserDTO;
import co.edu.unal.satacredito.mediation.UserEJBLocal;

@ManagedBean(name = "listUsers")
public class ListUsers extends AdministrationBean {

	private List<UserDTO> users;

	@EJB
	UserEJBLocal userEJB;
	
	@PostConstruct
	public void init(){
		this.users = userEJB.findAllUsers();
	}

	public String getAllUsers() {
		return LIST_USERS;
	}

	public List<UserDTO> getUsers() {
		return users;
	}

}
